package com.finance.report.service;


import com.finance.framework.lang.Page;
import com.finance.framework.lang.PageResultBO;
import com.finance.report.bean.pojo.SupplierSalary;
import com.finance.report.dao.SupplierSalaryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class SupplierSalaryService implements ISupplierSalaryService {
	@Autowired
	private SupplierSalaryMapper supplierSalaryMapper;


	@Override
	public PageResultBO<SupplierSalary> listByPage(Page page) {
		PageResultBO<SupplierSalary> pageResultBO=new PageResultBO<SupplierSalary>();
		List<SupplierSalary>list=supplierSalaryMapper.listByPage(page);
		pageResultBO.setTotalRecord(page.getTotalRecord());
		pageResultBO.setPageSize(page.getPageSize());
		pageResultBO.setPageNo(page.getPageNo());
		pageResultBO.setDataList(list);
		return pageResultBO;
	}

	@Override
	public boolean deleteByMonth(String month) {
		return supplierSalaryMapper.deleteByMonth(month)>=0;
	}
}
